package fge;

/**
 * A stupid decorator workaround hack, to circumvent that the function can not 
 * be set by the property editor itself. Rather, when the user tries to edit the 
 * function through the property editor, the CodeEditor should open instead.
 */
public class Function {
	private Fcomponent comp;

	public Function(Fcomponent _comp) {
		this.comp = _comp;
	}

	@Override
	public String toString() {
		return Function.propertyMessage();
	}

	public static String propertyMessage() {
		return "Click to edit";
	}
	
	/**
	 * Give FuncPropertyField::setValue a way to open the CodeEditor
	 * @return 
	 */
	public Fcomponent getComp() {
		return comp;
	}
}
